import React from 'react';
import HeaderFooter from '../../../container/container'

class Second extends React.Component{
    static getInitialProps: ({ query }: any) => Promise<any>;
    props: any;
    constructor (props) {
      super(props)
    }
    render(){
        return(
            <HeaderFooter active='helps'>
                <div>{this.props.id}</div>
            </HeaderFooter>
        )
    }
}
Second.getInitialProps = async function ({query}) {
    console.log(query)
    query.title = getTitleById(query.id)
    return query
  }
  function getTitleById (id: string) {
    return `title${id}`
  }
export default Second;